package util

import (
	"github.com/axgle/mahonia"
	"io/ioutil"
	"net/http"
)

func GetGBK(url string, c chan string) {
	resp, _ := http.Get(url)
	resbody := mahonia.NewDecoder("gbk").NewReader(resp.Body)
	bytes, _ := ioutil.ReadAll(resbody)
	c <- string(bytes)
}
